package org.springblade.modules.admin.vo.parts;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.Func;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Description 配件基础信息VO
 * @Author ysq
 * @Date 2024/05/21
 **/
@Data
public class PartsBaseInfoVO {

	@ApiModelProperty(value = "配件编号")
	private String code;

	@ApiModelProperty(value = "外部配件编号")
	private String otherCode;

	@ApiModelProperty(value = "配件类别名称")
	private String maintainPartsName;

	@ApiModelProperty(value = "配件名称")
	private String partsName;

	@ApiModelProperty(value = "配件规格")
	private String specifications;

	@ApiModelProperty(value = "规格型号")
	private String model;

	@ApiModelProperty(value = " 品牌名称")
	private String brand;

	@ApiModelProperty(value = "单位")
	private String unit;

	@ApiModelProperty(value = "数量")
	private Integer num;

	@ApiModelProperty(value = "卓梅尼物号")
	private String gechCode;

	@ApiModelProperty(value = "销售单价(含税)/元")
	private BigDecimal initSalePrice;

	@ApiModelProperty(value = "安装费(含税)/元")
	private BigDecimal installationFee;

	@ApiModelProperty(value = "销售总额(含税)/元")
	private BigDecimal initTotalSales;

	@ApiModelProperty(value = "实际销售单价(含税)/元")
	private BigDecimal salePrice;

	@ApiModelProperty(value = "实际销售总额(含税)/元")
	private BigDecimal totalSales;

	@ApiModelProperty(value = "报价单附件")
	private List<Map<String, String>> quotationFiles;

	@ApiModelProperty(value = "报价单回签附件")
	private List<Map<String, String>> quotationReplyFiles;

	public void setSalePrice(String salePrice) {
		if (Func.isNotBlank(salePrice)) {
			this.salePrice =  new BigDecimal(salePrice);
		}
	}

	public void setInstallationFee(String installationFee) {
		if (Func.isNotBlank(installationFee)) {
			this.installationFee = new BigDecimal(installationFee);
		}
	}

	public void setTotalSales(String totalSales) {
		if (Func.isNotBlank(totalSales)) {
			this.totalSales =  new BigDecimal(totalSales);
		}
	}

	public void setCode(String code) {
		this.code = code;
	}

	public void setInitSalePrice(String initSalePrice) {
		if (Func.isNotBlank(initSalePrice)) {
			this.initSalePrice =  new BigDecimal(initSalePrice);
		}
	}

	public void setInitTotalSales(String initTotalSales) {
		if (Func.isNotBlank(initTotalSales)) {
			this.initTotalSales =  new BigDecimal(initTotalSales);
		}
	}
}
